<route lang="json5">
	{
	style: {
	navigationStyle: 'default',
	navigationBarTitleText: '农事财务记录',
	},
	}
</route>

<template>
	<view class="content-warp">
		<wd-datetime-picker :formatter="formatter"  class="datetime-picker" ref="wdDatetimePickersData" v-model="value" type="year"  label="年">
		</wd-datetime-picker>
	</view>
</template>

<script setup lang="ts">
	import {
	  ref,
	  reactive,
	  getCurrentInstance,
	  onMounted,
	  watch
	} from 'vue';
	const value = ref()
	const formatter = (type, value) => {
	  switch (type) {
	    case 'year':
	      return value + '年'
	    default:
	      return value
	  }
	}
	const wdDatetimePickersData = ref(null)
	onMounted(()=>{
		wdDatetimePickersData.value?.open()
	})
	
	
</script>

<style scoped lang="scss">
	.content-warp {
		background-color: #f4f4f4;
		height: 100%;
		min-height: 100vh;
		position: relative;
	}
	.datetime-picker{
		margin-top: -100px;
	}
	

</style>